vvmx: fix instruction decode segment limit check
authorJan Beulich <jbeulich@suse.com>
Wed, 25 Apr 2012 12:54:36 +0000 (13:54 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 25 Apr 2012 12:54:36 +0000 (13:54 +0100)
commita6c6766868fa6d78c902caaa9154b9f44c4a7f02
treee4e15fb6d01cf123741c23a060a51f03ae6e9677
parent4aab59a3c58a3d009f26d3198730256f92193698
vvmx: fix instruction decode segment limit check

- no limit check for 64-bit mode (and GS: is not special in any way)
- limit check is needed in compatibility mode
- canonical address check should instead be performed for 64-bit mode
- the last accessed byte must be within limits, not the first byte
- past the accessed range
- segment base address should be ignored for 64-bit mode unless FS: or
  GS: is in use

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Keir Fraser <keir@xen.org>
xen/arch/x86/hvm/vmx/vvmx.c